export default {
  form_sale2fapiao_wizard: {
    _odoo_model: 'ir.ui.view',
    model: 'fp.sale2fapiao.wizard',
    type: 'form',

    arch: {
      buttons: [
        {
          name: 'create_fapiao',
          string: '创建发票',
          type: 'object',
          btn_type: 'primary'
        }
      ]
    },

    fields: {
      invoice_type: {},
      split_id: { required: 1 },

      sale_order_ids: {
        string: '销售订单',
        widget: 'x2many_tree',
        readonly2: 1,
        views: {
          tree: {
            fields: {
              name: {},
              partner_id: {},
              amount_untaxed: {},
              amount_tax: {},
              amount_total: {}
            }
          },
          form: {
            fields: {
              name: {},
              partner_id: {},
              amount_untaxed: {},
              amount_tax: {},
              amount_total: {}
            }
          }
        }
      }
    }
  },

  action_sale_to_fapiao: {
    _odoo_model: 'ir.actions',
    name: 'ods to sale',
    type: 'ir.actions.act_window',
    res_model: 'fp.sale2fapiao.wizard',
    domain: [],
    context: {
      active_model: 'fp.sale.order'
    },
    views: {
      form: 'form_sale2fapiao_wizard'
    }
  }
}
